Intelligent blemish control algorithm and apparatus

ABSTRACT

An image processing method and apparatus is described for processing a signal from a monochrome or color sensor that may be subject to pixel defects or blemishes. Without prior knowledge of any pixel defects, the processing method examines each pixel value and its neighboring pixel values. A number of tests are applied to the set of pixel values to determine whether the underlying pixel is defective. If the underlying pixel is determined to be defective, the pixel value is replaced by an estimate value derived from the values of its neighboring pixels. Otherwise, the pixel value remains intact.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The invention relates to the field of digital image processingand more specifically to blemish control in solid-state CCD/CMOS sensorsthat are subject to pixel defects.

[0003] 2. Description Relative to the Prior Art

[0004] Pixel defects in solid-state sensors such as CCD/CMOS sensorshave been a common problem. The output from a CCD/CMOS sensor is subjectto artifacts due to bad pixels. The visual effect of bad pixels can bevery annoying as bad pixels manifest as black, white or gray dots incaptured images. With sensor sizes increasing into the mega-pixel range,pixel defects are almost inevitable. Because it is very hard to producedefect-free sensors, it has been common practice for CCD/CMOS sensormanufacturers to market sensors with a small amount of defective pixels.These slightly defective sensors are often shipped with a record listingthe locations of defective pixels.

[0005] Sensors with a slight defect might be tolerable for someapplications if care is taken to mitigate the effect of impairment. Acommon solution to mitigate the effect of pixel defects involves theregistration of the bad pixel locations before the product is shippedand involves an algorithm to produce the proper pixel value for thecorresponding bad pixels of the captured image. For example, Kodak, asensor manufacturer, is marketing its sensors with various defectclasses ranging from defect free to some point defects, cluster defectsand column defects. Because the locations of bad pixels are random, arecord of these locations must be kept with each individual device.Usually, the record is transferred to non-volatile memory in the sensordevice. If the record is lost, however, the sensor device must bere-tested to obtain the locations of the bad pixels. Once the locationsof the bad pixels are known, the corresponding pixel values should bereplaced by values estimated from surrounding pixel values.Interpolation can be used to obtain the estimated values.

[0006] Pixel defects can be classified in a variety of ways. Accordingto one model, there are three types of pixel defects: stuck high, stucklow and abnormal sensitivity. When a pixel is stuck high (white pixel),its output is always very high regardless the input light intensity.When a pixel is stuck low (dark pixel), its output is always very lowregardless of the input light intensity. The pixel subject to abnormalsensitivity produces an output level different from (higher or lowerthan) the normal pixels by a certain amount. To further illustrate, apixel with the stuck high defect manifests itself as a very noticeableartifact (bright spot in a gray or dark area), which is most visuallyobjectionable in a gray or dark area, particularly in a monochromesensor. A pixel with stuck-low defect also produces a noticeableartifact (dark spot in a gray or bright area). A pixel with theabnormal-sensitivity defect is relatively more tolerable.

[0007] Another traditional method of dealing with the defective pixelsinvolves a defect table with predetermined locations of the defectivepixels. A description of this method can be found in US Pat. No.5,008,739, “Real-Time Digital Processor for Producing Full ResolutionColor Signals from a Multi-Color Inage Sensor,” by Hibbard. In thatdisclosure, a defect concealment circuit is incorporated to estimate thevalues for defective pixels, the locations of which are predeterminedand placed in a defect table (column 6, line 39).

[0008] Another existing system to cope with the bad sensor pixelsinvolves the application of a sequence of random test pictures. Aftereach test picture is captured, each pixel of the sensor is compared toits neighboring pixels. Applying a function (see below), statisticaldata is collected to determine whether a pixel is defective. Theprobability of finding pixel defects increases as more test pictures areused. This method was developed by Y-P Tan and T. Acharya. This systemis described in more detail in “A Robust Sequential Approach for theDetection of Defective Pixels in an Image Sensor,” published inProceedings of IEEE Conference on Acoustics, Speech and SignalProcessing, vol. 4, pp. 2239-2242, March 1999. A minimum neighboringpixel difference (MND) is calculated as:

y(i,j)=min{|I(i,j)−I(m,n)|} for (m,n)∈G(i,j)

[0009] where G(i,j) denotes the locations of the pixels within theneighboring support around pixel (i,j). I(i,j) is the output of pixel(i,j), and I(m,n) is the output pixel at (m,n). They examine theconditional probability density function p(y/z), where z is the pixelvalue from the neighborhood of (i,j) that results in the MND for theunderlying pixel y. The conditional probability density functionexhibits very distinctive characteristics between a normal pixel and adefective pixel. When enough statistical data is collected for eachpixel location, a fairly accurate decision can be made as to whether anunderlying pixel has a defect, and the type of defect if it isdefective. Based on simulation, they concluded that accurate defectdetection could be made with a training process where sequence of 8random test pictures is applied to the function described above. Thoughthe method can result in accurate defect detection, it relies on thetraining process to form the conditional probability density function.This process may not be desirable.

[0010] Another method to alleviate the effect of defective pixelsinvolves applying signal processing to every pixel. Proper pixel valuesare extrapolated from the values of neighboring pixels. The method isapplied globally to all pixels whether defective or not. This method wasdeveloped by B. Dierickx and G. Meynants in “Missing Pixel CorrectionAlgorithm for Image Sensor,” published in Proceedings of SPIE, vol.3410, pp. 200-203, May 1998. The assumption is that an image projectedthrough a lens or any other optical system is never perfectly sharp.Even with ideal lenses, a star image, for example, would not beprojected on a single pixel. The point-like source of the star would besmeared out over a central pixel and a few neighbors. To correct thepossible defective pixel, they examine 4 pixels surrounding anunderlying pixel (one-dimensional processing). They form an extrapolatedvalue for the underlying pixel from the 2 pixels on the left and the 2pixels on the right.

[0011] The upper bound, C_(max), for the underlying pixel is defined asthe maximum value among the 2 extrapolated values and the two immediateneighboring pixel values. The lower bound, C_(min), for the underlyingpixel is defined as the minimum value among the 2 extrapolated valuesand the two immediate neighboring pixel values. The final correctedvalue for the underlying pixel is the median of C_(max), C_(min), andthe original underlying pixel value. The signal processing is applied toevery pixel whether it is defective or not. Though the method does afairly good job alleviating the effect of defective pixels, some subtlefeatures, however, may be altered inadvertently. This occurs becauseeven all pixels are fixed, even good pixels.

[0012] A few US Patents granted in recent years relate to missing pixelprocessing for color image sensors. These patents, however, deal with anissue very different from the present invention. For example, U.S. Pat.Nos. 6,181,376 and 6,188,804 are directed to a full reconstruction of asampled image which has missing information. In this case, the sensordoes not provide full resolution samples. One such example is the Bayerpattern (RGB sampling pattern) where each line contains either R-Gpixels or G-B pixels. The G pixel pattern thus represents 50% of thetotal pixels and each of the R and B pixels represent 25% of the totalpixels. These two patents address the method of interpolating the valuesfor the missing color pixels.

[0013] If the locations of defective pixels are known, a simpleinterpolation would generally do a decent job. In such a scenario, whena slightly defective sensor is incorporated into an imaging system, asimple pixel interpolation can be applied to the defective locations.This simple method can effectively reduce the artifacts caused by badpixels. However, a defective pixel detection algorithm can result infalse detections where a normal pixel is classified as a defectivepixel. Moreover, the probability of false detections increases as sensorsizes increase.

[0014] A need therefore remains for an image processing method andapparatus that detects and identifies pixel defects without priorknowledge of such defects and restores the values of defective pixels ina manner that is time efficient, simple, and reliable. A need alsoremains for a method and apparatus that minimizes the occurrence offalse detections.

SUMMARY OF THE INVENTION

[0015] An intelligent control circuit for pixel defects in a sensor, thecontrol circuit including a defective pixel detection circuit fordetecting whether an underlying pixel is defective; and a pixel valuerestoration circuit for replacing the value of the underlying pixel, ifdefective, with a restoration value derived from the values ofneighboring pixels; wherein the control circuit operates in real-time.

[0016] The intelligent control circuit applies at least one of threetests to determine whether an underlying pixel has one of three types ofdefects: stuck high, stuck low and abnormal sensitivity. In oneembodiment, the intelligent control circuit compares the value of theunderlying pixel to the values of a first group of neighboring pixelsfor a stuck high test and for a stuck low test, and compares the valueof the underlying pixel to the values of a second group of neighboringpixels for a abnormal sensitivity test. In one embodiment, the firstgroup includes the pixels immediately surrounding the underlying pixel,and the second group includes the pixels immediately surrounding andincluding the first group. If a defect is found, the intelligent controlcircuit detects whether a line or an edge feature passes through theunderlying pixel. The intelligent control circuit then replaces thevalue of the underlying pixel with a restoration value that is derivedfrom the neighboring pixels. To derive the restoration value, theintelligent control circuit applies a spatially adaptive interpolationwhich involves either a one- or two-dimensional interpolation dependingon whether or not a line or an edge feature passes through theunderlying pixel, respectively.

[0017] Embodiments of the present invention achieve their purposes andbenefits in the context of known circuit technology and known techniquesin the electronic arts. Further understanding, however, of the nature,objects, features, and advantages of the present invention is realizedby reference to the latter portions of the specification, accompanyingdrawings, and appended claims. Other objects, features, and advantagesof the present invention will become apparent upon consideration of thefollowing detailed description, accompanying drawings, and appendedclaims.

BRIEF DESCRIPTION OF THE DRAWINGS

[0018]FIG. 1 shows a simplified high-level block diagram of an imageprocessing unit that contains the main functional elements required toimplement a blemish control algorithm, according to an embodiment of thepresent invention;

[0019]FIG. 2 shows a depiction of an array of monochrome sensor elementswith an underlying pixel circled and the neighboring pixels shown in theshaded area;

[0020]FIG. 3 shows a depiction of an array of color sensor elements withthe underlying green pixels circled and the neighboring green pixelsshown in the shaded area;

[0021]FIG. 4 shows a depiction of an array of color sensor elements withthe underlying blue pixels circled and the neighboring blue pixels shownin the shaded area;

[0022]FIG. 5 shows a depiction of an array of color sensor elements withthe underlying red pixels circled and the neighboring red pixels shownin the shaded area;

[0023]FIG. 6 shows a simplified high-level block diagram detailing thedefective pixel detection stage of FIG. 1;

[0024]FIG. 7 shows a depiction of linear extrapolation forone-dimensional data;

[0025]FIG. 8 shows a simplified high-level block diagram detailing thepixel value restoration stage of FIG. 1;

[0026]FIG. 9 shows a depiction of four possible feature lines passingthrough an underlying green pixel;

[0027]FIG. 10 shows a depiction of four possible feature lines passingthrough an underlying blue pixel;

[0028]FIG. 11 shows a depiction of four possible feature lines passingthrough an underlying red pixel; and

[0029]FIG. 12 shows a depiction of spatially adaptive interpolationalong the direction of detected line or edge.

DESCRIPTION OF THE SPECIFIC EMBODIMENTS

[0030] With reference to the drawings, embodiments of an imageprocessing method and apparatus, according to the present invention, isdescribed below.

[0031]FIG. 1 shows a simplified high-level block diagram of an imageprocessing unit 18, also referred to as an intelligent control circuit,that contains the main functional elements required to implement ablemish control algorithm, according to embodiments of the presentinvention. Image processing unit 18 includes a defective pixel detectionstage 14 and a pixel value restoration stage 16. An output from aCCD/CMOS sensor device 12 feeds into image processing unit 18. Imageprocessing unit 18 can operate with a CCD/CMOS sensor device inreal-time, i.e., each time the CCD/CMOS feeds a new image to imageprocessing unit 18. This means that image processing unit 18 can operatein the field well after such a sensor has been manufactured and placedinto products.

[0032] In operation, defective pixel detection stage 14 examines eachpixel and its surrounding pixels, also referred to as neighboringpixels. Defective pixel detection stage 14 then determines whether eachunderlying pixel is defective. Defective pixel detection stage 14 canapply three tests to determine the type defect, e.g., whether the pixelis stuck low, stuck high, or abnormally sensitive, one test for eachtype of defect. If a defect is found, pixel value restoration stage 16detects whether a line or an edge feature passes through the underlyingpixel. Pixel value restoration stage 16 then replaces any defectivepixel to a proper value, also referred to as a restoration value. Thisrestoration value is derived from the neighboring pixels. These stepsare described in more detail below.

[0033]FIG. 2 shows a depiction of an array of monochrome sensor elementswith an underlying pixel circled and the neighboring pixels shown in theshaded area. In this particular depiction, the pixels are for amonochrome sensor. In some embodiments, the neighboring pixels aredivided into at least two groups, or tiers. Referring still to FIG. 2,the pixels in the surrounding area are divided into two tiers N1 and N2.Tier N1 includes the pixels immediately surrounding the underlyingpixel. Tier N2 includes the pixels of tier N1 and the pixels immediatelysurrounding tier N1. The present invention is not limited to two tiers.For example, there could be a third tier that includes pixelsimmediately surrounding tier N2, and so on. Moreover, the shape of thetiers will vary depending on the specific application. For instance, thetiers need not be rectangular. A diamond shaped area is also areasonable choice for the surrounding area.

[0034]FIG. 3 shows a depiction of an array of color sensor elements withthe underlying green pixels circled and the neighboring green pixelsshown in the shaded area. Here, the neighboring pixels form a diamondshape. Moreover, the size of the surrounding area can vary depending onthe specific application. A smaller area that only includes eight of theimmediate pixels could be a reasonable choice.

[0035] According to the present invention, the pixels can be allocatedto different tiers in a variety of ways depending on the specificapplication. Moreover, embodiments of the blemish control algorithm canadapt to various patterns. For example, it can be applied to the Bayerpattern which is typically used for color CCD/CMOS sensors. The Bayerpattern is widely used and is well known in the art. It is disclosed inU.S. Pat. No. 3,971,065, issued to B. E. Bayer. According to thepattern, the RGB color elements form a checker board pattern.

[0036]FIG. 4 shows a depiction of an array of color sensor elements withthe underlying blue pixels circled and the neighboring blue pixels shownin the shaded area. FIG. 5 shows a depiction of an array of color sensorelements with the underlying red pixels circled and the neighboring redpixels shown in the shaded area. It is to be understood that the shape,size, and pattern of the tiers described are merely examples and shouldnot limit the scope of the claims herein. In light of the presentinvention, one of ordinary skill in the art would recognize many othervariations, modifications, and alternatives.

[0037] When determining whether an underlying pixel is defective, eachgroup is processed separately. The intelligent control circuit comparesthe value of the underlying pixel to the values of a first group ofneighboring pixels for a stuck high test and for a stuck low test, andcompares the value of the underlying pixel to the values of a secondgroup of neighboring pixels for a abnormal sensitivity test.

[0038] In one embodiment, the blemish algorithm processes the pixels oftier N1 first. If a defect is found, the underlying pixel is thenprocessed by the pixel value restoration stage (described below). If nodefect is found, the blemish algorithm then processes the pixels of tierN2. This specific order is rather efficient because tier N1 has fewerpixels than does tier N2 making the processing faster. Also, in someembodiments, the stuck high and stuck low tests are applied to thepixels of tier N1 and the abnormally sensitive test is applied to thepixels of tier N2. The specific order and steps will depend on theapplication. In light of the present invention, one of ordinary skill inthe art would recognize many other variations, modifications, andalternatives. For example, in other embodiments, both tiers could beprocessed for detection of a first type of defect before any tier isprocessed for a second type of defect. In yet other embodiments, forexample, tiers N1 and N2 could be processes in parallel.

[0039]FIG. 6 shows a simplified high-level block diagram detailing thedefective pixel detection 14 stage of FIG. 1 (labeled 120 in FIG. 6).Defective pixel detection stage 120 couples to line buffers 112. Linebuffers 112 serve as a temporary holding place for the lines around anunderlying pixel. For the example, in FIG. 2, a total of five linebuffers would be required. In FIG. 3, a total of nine line buffers wouldbe required. In FIGS. 4 and 5, a total of five line buffers would berequired.

[0040] Defective pixel detection stage 120 includes three processingstages: a white pixel detection stage 114, a dark pixel detection stage116, and an abnormal sensitivity pixel detection stage 118. In thespecific embodiment of FIG. 6, the three processing stages are shown ina tandem arrangement. They can, however, be in other arrangements, suchas in a parallel arrangement, where a more efficient for hardwareimplementation such as a logic OR circuit can be used to combine thethree results.

[0041] In operation, each underlying pixel is tested for each type ofdefect. In some embodiments, each underlying pixel is tested in thefollowing order: stuck high, stuck low, and then abnormal sensitivity.The order of course can vary depending on the specific application. Forexample, another order of testing could be to first test for a stuck lowdefect, then a stuck high defect, then an abnormal sensitivity defect.Other orders of testing might be appropriate for some applicationsdepending on the specific application.

[0042] It is to be understood that the implementation of FIG. 6 ismerely an example and should not limit the scope of the claims herein.In light of the present invention, one of ordinary skill in the artwould recognize many other variations, modifications, and alternatives.Also, the described system and method can be implemented in a multitudeof different forms (i.e., software, hardware, or a combination of both)in a variety of systems.

[0043]FIG. 7 shows a depiction of linear extrapolation forone-dimensional data. The white pixel detection stage 114 compares thevalue Ip of the underlying pixel with a threshold value White_Thresh. IfI_(p)>White_Thresh, the white pixel detection stage 114 performs thefollowing calculation:

Min_Diff=min(|Ip−I(x)|) for all x∈N 1

[0044] The Min_Diff is then compared with a threshold value,white_Diff_Thresh. If

Min_Diff>White_Diff_Thresh,

[0045] the underlying pixel is declared to be a white pixel.

[0046] If the underlying pixel is not a white pixel, the dark pixeldetection is performed. The dark pixel detection stage 116 compares thevalue I_(p) of the underlying pixel with a threshold value Dark_Thresh.If I_(p)<Dark_Thresh, the dark pixel detection stage 116 performs thefollowing calculation:

Min_Diff=min(|Ip−I(x)|) for all x∈N 1

[0047] The Min_Diff is then compared with a threshold value,Dark_Diff_Thresh. If

Min_Diff>Dark_Diff_Thresh

[0048] the underlying pixel is declared to be a dark pixel. The abnormalsensitivity pixel detection stage 118 uses an extrapolation method tocompare the underlying pixel value and the projected value. If theunderlying pixel value varies from the projected value beyond a certainpercentage, the underlying pixel is declared to be an abnormal pixel.For the one-dimensional case, a simple linear extrapolation isillustrated in FIG. 7. Let I_(A), I_(B), and I_(P) be the pixel valuesfor A, B, and P respectively. The projected value, Î_(P) based on A andB using the linear extrapolation method is:

Î _(P)=2I _(B) −I _(A).

[0049] We extend this one-dimensional extrapolation to a simplifiedtwo-dimensional extrapolation as:${\hat{I}}_{P} = {{2\left( {\frac{1}{8}{\sum\limits_{x \in {N1}}I_{x}}} \right)} - \left( {\frac{1}{16}{\sum\limits_{{x \in {N2}},{x \notin {N1}}}I_{x}}} \right)}$

[0050] If (|ÎP−IP|/ÎP)>Thresh_AS, the underlying pixel is declared as anabnormal sensitivity pixel, where Thresh_AS is the threshold value.

[0051] At the output of the defective pixel detection stage 120, allpixels are determined whether they are defective or not. Pixelsdetermined to be defective, they undergo pixel value restoration stage16 (FIG. 1). Normal pixels bypass pixel value restoration stage 16.

[0052]FIG. 8 shows a simplified high-level block diagram detailing thepixel value restoration stage 16 of FIG. 1. The pixel value restorationstage couples to line buffers 122. Line buffers 122 serve as a temporaryholding place for the lines around an underlying pixel. The pixel valuerestoration stage includes a spatially adaptive interpolation stage 124and line-edge feature detection stage 126. Stages 124 and 126 involvethe neighboring pixels, i.e., the pixels surrounding an underlyingpixel. Line buffers 122 are thus required. Line buffers 122 (as well asline buffers 112 of FIG. 6) can share the same memory.

[0053] Generally, to derive a restoration value, the intelligent controlcircuit applies a spatially adaptive interpolation which involves eithera one- or two-dimensional interpolation depending on whether or not aline or an edge feature passes through the underlying pixel,respectively. To apply a spatially adaptive interpolation, it must firstbe known whether a line or edge feature passes through the underlyingpixel. There are some known techniques for detecting lines and edges,see Digital Image Processing, by R. C. Gonzalez and R. E. Woods,Addison-Wesley:Reading, Mass., 1992. If no line or edge feature isdetected, the underlying pixel is likely in a smooth area. A regulartwo-dimensional linear interpolation would be sufficient. Regular(two-dimensional) image interpolation performs adequately for smoothareas. However, it often softens or smears sharp edges.

[0054] To determine whether a line or edge feature passes through anunderlying pixel, a line-edge feature algorithm, according to thepresent invention is invoked. In a specific embodiment, one-dimensionalinterpolation is applied on the 4 neighboring pixels along the diagonaldirection where a line or edge feature is detected. A properly designedalgorithm for defective-pixel detection will lead to a small percentageof pixels being classified as defective. The majority of the pixels willnot be affective by subsequent interpolation. Among the small percentageof pixels classified as defective, some of them might be misclassified.Nevertheless, the spatially adaptive interpolation (described below)should have little inadvertent effect. As a matter of fact, spatiallyadaptive interpolation can even enhance the picture quality.

[0055] Once it is determined whether a line or edge feature passesthrough an underlying pixel, a spatially adaptive interpolation filteris then applied accordingly. FIGS. 9, 10 and 11 each show a depiction offour possible feature lines passing through an underlying green pixel,blue pixel and red pixel, respectively. In some embodiments, a techniqueusing a 5×5 mask is adopted. The line and edge features in fourdifferent orientations, as shown in FIGS. 9, 10 and 11 for green, blueand red pixels respectively, are tested.

[0056]FIG. 12 shows a depiction of spatially adaptive interpolationalong the direction of detected line or edge. If a line or edge featureis detected, a one-dimensional interpolation is applied along thedirection of the detected line or edge. The actual direction will dependon the specific image texture around the underlying pixel. As a result,spatially adaptive interpolation of the present invention restores thevalues of defective pixels while preserving the sharpness of images.Moreover, spatially adaptive interpolation stage 124 minimizes potentialartifacts caused by interpolation on normal pixels.

[0057] Conclusion

[0058] In conclusion, it can be seen that embodiments of the presentinvention provide numerous advantages. Principally, they mitigateproblems associated with defective pixels in an efficient and reliablemanner without the prior knowledge of the locations and the number ofdefective pixels. Specific embodiments of the present invention arepresented above for purposes of illustration and description. The fulldescription will enable others skilled in the art to best utilize andpractice the invention in various embodiments and with variousmodifications suited to particular uses. After reading and understandingthe present disclosure, many modifications, variations, alternatives,and equivalents will be apparent to a person skilled in the art and areintended to be within the scope of this invention. Moreover, thedescribed circuits and method can be implemented in a multitude ofdifferent forms such as software, hardware, or a combination of both ina variety of systems. Therefore, it is not intended to be exhaustive orto limit the invention to the specific embodiments described, but isintended to be accorded the widest scope consistent with the principlesand novel features disclosed herein, and as defined by the followingclaims.

What is claimed is:
 1. An intelligent control circuit for pixel defectsin a sensor, the control circuit comprising: a defective pixel detectioncircuit for detecting whether an underlying pixel is defective; and apixel value restoration circuit for replacing the value of theunderlying pixel, if defective, with a restoration value derived fromthe values of neighboring pixels; wherein the control circuit operatesin real-time.
 2. The circuit of claim 1 wherein the defective pixeldetection circuit comprises: a white pixel detection circuit fordetecting stuck high defects; a dark pixel detection circuit fordetecting stuck low defects; and an abnormal sensitivity detectioncircuit for detecting abnormal sensitivity defects.
 3. The method ofclaim 2 wherein the underlying pixel is processed by at least one of thewhite pixel detection circuit, dark pixel detection circuit, andabnormal sensitivity detection circuit.
 4. The circuit of claim 3wherein the white pixel detection circuit, the dark pixel detectioncircuit, and the abnormal sensitivity detection circuit process theunderlying pixel serially.
 5. The circuit of claim 3 wherein at leasttwo of the white pixel detection circuit, the dark pixel detectioncircuit, and the abnormal sensitivity detection circuit process theunderlying pixel in parallel.
 6. The circuit of claim 1 wherein theneighboring pixels comprise: a first group; and a second group, eachgroup being processed by the defective pixel detection circuitseparately.
 7. The circuit of claim 6 wherein the first group comprisesa first plurality of pixels immediately surrounding the underlyingpixel.
 8. The circuit of claim 6 wherein the second group comprises asecond plurality of pixels immediately surrounding the first group. 9.The circuit of claim 6 wherein the first and second groups form arectangular shape.
 10. The circuit of claim 6 wherein the first andsecond groups form a diamond shape.
 11. The circuit of claim 6 whereinthe first and second groups incorporate the Bayer pattern.
 12. Thecircuit of claim 1 wherein the pixel value restoration circuit comprisesa line-edge feature detection circuit for detecting whether a line or anedge feature passes through the underlying pixel.
 13. The circuit ofclaim 1 wherein the pixel value restoration circuit comprises aspatially adaptive interpolation filter for deriving a restorationvalue.
 14. The circuit of claim 1 wherein the sensor is a CCD/CMOSsensor.
 15. An intelligent control circuit for pixel defects in asensor, the control circuit comprising: a defective pixel detectioncircuit for detecting whether an underlying pixel is defective, whereinthe detection occurs without prior knowledge of any pixel defects; and apixel value restoration circuit for replacing the value of theunderlying pixel, if defective, with a restoration value derived fromthe values of neighboring pixels.
 16. The circuit of claim 15 whereinthe defective pixel detection circuit determines the type of defect ofan underlying pixel, the type of defect being one of stuck high, stucklow, or abnormally sensitive.
 17. A method for processing pixel defectsin a sensor, the method comprising: measuring the value of an underlyingpixel; determining whether the underlying pixel is defective; deriving arestoration value from the values of neighboring pixels if theunderlying pixel is defective; and replacing the value of the underlyingpixel with a restoration value.
 18. The method of claim 17 wherein thestep of determining comprises at least one of the following types ofassessing: assessing whether the underlying pixel is stuck high;assessing whether the underlying pixel is stuck low; and assessingwhether the underlying pixel is abnormally sensitive.
 19. The method ofclaim 18 wherein the underlying pixel is processed serially such that afirst type of assessing is followed by a second type of assessing if theno defect is found during the first type of assessing, and wherein thesecond type of assessing is followed by a third type of assessing if theno defect is found during the second type of assessing.
 20. The methodof claim 18 wherein at least two of the types of assessing are processedin parallel.
 21. The method of claim 18 wherein the step of determiningfurther comprises grouping the neighboring pixels into at least a firstgroup and a second group, the first group and the second group beingprocessed separately; wherein the step of assessing whether theunderlying pixel is stuck high further comprises: comparing the value ofthe underlying pixel with a white threshold value; and calculating adifference value if the underlying pixel is greater than the whitethreshold value, the difference value being derived from comparing theunderlying pixel with the first group, wherein the underlying pixel isdeclared to be stuck high if the difference value is greater than thewhite threshold value. wherein the step of assessing whether theunderlying pixel is stuck low further comprises: comparing the value theunderlying pixel with a dark threshold value; and calculating adifference value if the underlying pixel is less than the dark thresholdvalue, the difference value being derived from comparing the underlyingpixel with the first group, wherein the underlying pixel is declared tobe stuck low if the difference value is greater than the dark thresholdvalue. wherein the step of assessing whether the underlying pixel isabnormally sensitive further comprises: comparing the value of theunderlying pixel value with a projected value, the projected value beingderived from the second group, wherein the underlying pixel is declaredto be an abnormal pixel if the underlying pixel value varies from theprojected value beyond a certain percentage.
 22. The method of claim 21wherein the first group comprises a first plurality of pixels thatimmediately surround the underlying pixel.
 23. The method of claim 21wherein the second group comprises a second plurality of pixels thatimmediately surround the first group.
 24. The method of claim 23 whereinthe second group comprises the first group.
 25. The method of claim 21wherein the first group and the second group are the same.
 26. Themethod of claim 17 further comprising detecting whether a line or anedge feature passes through the underlying pixel if determined to bedefective.
 27. The method of claim 26 wherein the step of detecting isachieved with a line-edge feature algorithm.
 28. The method of claim 17wherein the restoration value is derived from the values of theneighboring pixels using one-dimensional extrapolation.
 29. The methodof claim 17 wherein the restoration value is derived from the values ofthe neighboring pixels using two-dimensional extrapolation.
 30. Themethod of claim 17 wherein the step of replacing is achieved with aspatially adaptive interpolation filter.
 31. The method of claim 17wherein the step of replacing comprises applying a spatially adaptiveinterpolation along the direction of a line or edge feature if detected.